import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

import '../../AppConfig/Config.dart';
import '../../l10n/messages.dart';

class VoiceSetting extends StatefulWidget {
  const VoiceSetting({super.key});

  @override
  State<VoiceSetting> createState() => _VoiceSettingState();
}

class _VoiceSettingState extends State<VoiceSetting> {

  bool switchValue1 = true;
  bool switchValue2 = true;
  @override
  Widget build(BuildContext context) {
    var messages = AppLocalizations.of(context)!;
    return Scaffold(
      backgroundColor: MyColors.backgreyColor,
      appBar: AppBar(
        title: Text(messages["语音设置"],style: TextStyle(fontWeight: FontWeight.w300,fontSize: 16.sp),),
        centerTitle: true,
        backgroundColor: Colors.white,

      ),
    body: ListView(
      children: [
        Container(
          color: Colors.white,
          padding: EdgeInsets.only(left: 15.w,right: 15.w,top: 10.h,bottom: 10.h),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text("APP语音通知",style: TextStyle(color: Colors.black,fontSize: 16.sp),),
                  Text("接收智能货主派单、改价、成交语音",style: TextStyle(color: MyColors.textColor,fontSize: 12.sp),),
                ],
              ),
              CupertinoSwitch(
                value: switchValue1,
                activeColor:MyColors.themeColor,
                onChanged: (bool value) {
                  setState(() {
                    switchValue1 = value;
                  });
                },
              ),
            ],
          ),
        ),
        SizedBox(height: 8.h,),
        Container(
          color: Colors.white,
          padding: EdgeInsets.only(left: 15.w,right: 15.w,top: 10.h,bottom: 10.h),
          child: Row(
            mainAxisAlignment: MainAxisAlignment.spaceBetween,
            children: [
              Column(
                crossAxisAlignment: CrossAxisAlignment.start,
                children: [
                  Text("找货进度语音通知",style: TextStyle(color: Colors.black,fontSize: 16.sp),),
                  Text("接收智能调度找货进度电话提示",style: TextStyle(color: MyColors.textColor,fontSize: 12.sp),),
                ],
              ),
              CupertinoSwitch(
                value: switchValue2,

                activeColor:MyColors.themeColor,
                onChanged: (bool value) {
                  setState(() {
                    switchValue2 = value;
                  });
                },
              ),
            ],
          ),
        ),
      ],
    ),
    );
  }
}
